<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>📱 QRTransfer - 二维码文件传输工具</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .container {
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            padding: 40px;
            text-align: center;
            max-width: 600px;
            width: 100%;
            animation: fadeInUp 0.8s ease-out;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .logo {
            font-size: 4rem;
            margin-bottom: 20px;
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% {
                transform: translateY(0);
            }
            40% {
                transform: translateY(-10px);
            }
            60% {
                transform: translateY(-5px);
            }
        }

        h1 {
            color: #333;
            font-size: 2.5rem;
            margin-bottom: 15px;
            font-weight: 300;
        }

        .subtitle {
            color: #666;
            font-size: 1.2rem;
            margin-bottom: 40px;
            line-height: 1.6;
        }

        .features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
            margin: 40px 0;
        }

        .feature-card {
            background: #f8f9fa;
            padding: 30px 20px;
            border-radius: 15px;
            border: 2px solid transparent;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .feature-card:hover {
            transform: translateY(-5px);
            border-color: #667eea;
            box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
        }

        .feature-icon {
            font-size: 3rem;
            margin-bottom: 15px;
        }

        .feature-title {
            font-size: 1.5rem;
            color: #333;
            margin-bottom: 10px;
            font-weight: 600;
        }

        .feature-desc {
            color: #666;
            line-height: 1.5;
            margin-bottom: 20px;
        }

        .btn {
            display: inline-block;
            padding: 12px 30px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            text-decoration: none;
            border-radius: 25px;
            font-weight: 600;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            font-size: 1rem;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
        }

        .btn-secondary {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        }

        .footer {
            margin-top: 40px;
            padding-top: 30px;
            border-top: 1px solid #eee;
            color: #999;
            font-size: 0.9rem;
        }

        .tech-stack {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        .tech-badge {
            background: #e9ecef;
            color: #495057;
            padding: 5px 12px;
            border-radius: 15px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        @media (max-width: 768px) {
            .container {
                padding: 30px 20px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .logo {
                font-size: 3rem;
            }
            
            .features {
                grid-template-columns: 1fr;
                gap: 20px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="logo">📱</div>
        <h1>QRTransfer</h1>
        <p class="subtitle">
            <strong>QR Code File Transfer Solution</strong><br>
            安全、便捷的文件传输解决方案<br>
            支持大文件分块传输，无需网络连接
        </p>

        <div class="features">
            <div class="feature-card" onclick="window.open('sender/', '_blank')">
                <div class="feature-icon">📤</div>
                <div class="feature-title">文件发送端</div>
                <div class="feature-desc">
                    将文件转换为二维码序列<br>
                    支持任意格式文件<br>
                    智能分块与压缩
                </div>
                <a href="sender/" class="btn" target="_blank">开始发送</a>
            </div>

            <div class="feature-card" onclick="window.open('receiver/', '_blank')">
                <div class="feature-icon">📥</div>
                <div class="feature-title">文件接收端</div>
                <div class="feature-desc">
                    扫描二维码还原文件<br>
                    连续扫码模式<br>
                    实时进度显示
                </div>
                <a href="receiver/" class="btn btn-secondary" target="_blank">开始接收</a>
            </div>
        </div>

        <div class="footer">
            <p><strong>🔧 技术特性</strong></p>
            <div class="tech-stack">
                <span class="tech-badge">📦 Gzip压缩</span>
                <span class="tech-badge">🔐 CRC32校验</span>
                <span class="tech-badge">📱 响应式设计</span>
                <span class="tech-badge">🔄 连续扫码</span>
                <span class="tech-badge">📊 可视化进度</span>
            </div>
            <p style="margin-top: 20px;">
                <small>
                    💡 使用说明：先在发送端选择文件生成二维码，然后在接收端扫描二维码完成文件传输
                </small>
            </p>
        </div>
    </div>

    <script>
        // 添加一些交互效果
        document.addEventListener('DOMContentLoaded', function() {
            // 为卡片添加点击效果
            const cards = document.querySelectorAll('.feature-card');
            cards.forEach(card => {
                card.addEventListener('click', function(e) {
                    // 如果点击的不是链接，则触发链接点击
                    if (e.target.tagName !== 'A') {
                        const link = this.querySelector('a');
                        if (link) {
                            link.click();
                        }
                    }
                });
            });

            // 添加键盘快捷键
            document.addEventListener('keydown', function(e) {
                if (e.key === '1') {
                    window.open('sender/', '_blank');
                } else if (e.key === '2') {
                    window.open('receiver/', '_blank');
                }
            });
        });
    </script>
</body>
</html>